package com.siecomzg.constconfig;

/**
 * Created on 2016/7/18.
 */
public class ConstDefine {
//    public static String FINANCIAL_PORT = "/dev/ttyUSB2";//A218
//    public static String ID_PORT  ="/dev/ttyUSB1"; //A218
//    public static String FINGERPRINT_PORT = "/dev/ttyUSB0";
//    static {
//        File file = new File(FINANCIAL_PORT);
//        if(file.exists()){
//            FINANCIAL_PORT = "/dev/ttyUSB2";//A218
//            ID_PORT  ="/dev/ttyUSB1"; //A218
//
//        }else{
//            FINANCIAL_PORT = "/dev/ttyUSB1";//A218
//            ID_PORT  ="/dev/ttyUSB0"; //A218
//        }
//
//    }

//    public static final String KEYBOARD_PORT  ="/dev/ttyS3";//A218

    /**
     * 心跳间隔
     */
    public final static int intervalMs = 5000;
    /**
     * 加密算法
     */
    public static final int KEY_3DES = 1;
    public static final int KEY_SM = 2;
    public static final int KEY_NOENCRYPTION = 3;
    /**
     * cardType定义
     */
    public static final int IC_CARD = 0x00;
    public static final int MSR_CARD = 0x01;
    public static final int PIC_CARD = 0x02;
    public static final int AUTO_CARD = 0x03;
    /**
     * 模块编号
     */
    public static final int ID_MODULE = 1000;
    public static final int KEY_MODULE = 1001;
    public static final int FINGE_MODULE = 1002;
    public static final int FINAN_MODULE = 1003;

    public static final int HEARTBEAT_MODULE = 1004;
    public static final int OTHER_MODULE = 1005;

    public static final int SIGNATURE_MODULE = 1006;
    public static final int UPDATE_MODULE = 1007;

    /**
     * 功能请求
     */
    public static final int ID_READ_REQUEST = 1;
    public static final int ID_RESPOND = 2;


    public static final int IC_REQUEST = 3;
    public static final int IC_RESPOND = 4;

    public static final int PIC_REQUEST = 5;
    public static final int PIC_RESPOND = 6;

    public static final int MSR_REQUEST = 7;
    public static final int MSR_RESPOND = 8;

    public static final int AUTO_REQUEST = 9;
    public static final int AUTO_RESPOND = 10;

    public static final int AUTO_CHECK_REQUEST = 9001; // 自动检测卡 返回检测到的卡类型
    public static final int AUTO_CHECK_RESPOND = 9002; // 磁条卡则返回读取到的磁道数据
    public static  final int PIC_LOG_REQUEST = 11;
    public static  final int PIC_LOG_RESPOND = 12;

    public static  final int IC_LOG_REQUEST = 13;
    public static  final int IC_LOG_RESPOND = 14;


    public static  final int ARQC_REQUEST = 15;
    public static  final int ARQC_RESPOND = 16;

    public static final int FINGERFEARURE_REQUEST = 17;
    public static final int FINGERFEARURE_RESPOND = 18;

    public static final int FINGER_REGIST_REQUEST = 1701; //指纹注册登记
    public static final int FINGER_REGIST_RESPOND = 1702;
    public static final int FINGER_VER_REQUEST = 19;
    public static final int FINGER_RESPOND= 20;

    public static final int INPUT_COMMU_KEY_REQUEST = 2001;  //设置通讯密钥
    public static final int INPUT_COMMU_KEY_RESPOND = 2002;
    public static final int INPUT_MAIN_REQUEST = 21;
    public static final int INPUT_MAIN_RESPOND = 22;
    public static final int INPUT_WORK_REQUEST = 23;
    public static final int INPUT_WORK_RESPOND = 24;
    public static final int INPUT_KEY_REQUEST = 25;
    public static final int INPUT_KEY_RESPOND = 26;
    public static final int SET_ENCRYPT_REQUEST = 27;
    public static final int SET_ENCRYPT_RESPOND = 28;
    //SM2或者RSA公钥加密随机主密钥
    public static final int SM2_RSA_MAINKEY_REQUEST = 29;
    public static final int SM2_RSA_MAINKEY_RESPOND = 30;

    public static final int DEVICE_SERIAL_NO_REQUEST = 31;
    public static final int DEVICE_SERIAL_NO_RESPOND = 32;

    public static final int CODENAME_REQUEST = 33;
    public static final int CODENAME_RESPOND = 34;
    public static final int GET_CODENAME_REQUEST = 35;
    public static final int GET_CODENAME_RESPOND = 36;
    /**
     * 取消请求
     */
    public static final int CANCEL_FINAN_REQUEST = 37;
    public static final int CANCEL_FINAN_RESPOND = 38;

    public static final int FINGER_CANCEL_REQUEST = 39;
    public static final int FINGER_CANCEL_RESPOND = 40;

    public static final int IDENTITY_CANCEL_REQUEST = 41;
    public static final int IDENTITY_CANCEL_RESPOND = 42;

    public static final int KEYBOARD_CANCEL_REQUEST = 43;
    public static final int KEYBOARD_CANCEL_RESPOND = 44;

    public static final int SIGNATURE_REQUEST = 45;
    public static final int SIGNATURE_RESPOND = 46;

    public static final int SIGNATURE_CANCEL_REQUEST = 47;
    public static final int SIGNATURE_CANCEL_RESPOND = 48;

    public static final int UPDATE_FW_REQUEST = 49;
    public static final int UPDATE_FW_RESPOND = 50;

    public static final int RESET_REQUEST = 51;
    public static final int RESET_RESPOND = 52;

    public static final int TMK_REQUEST = 53;
    public static final int TMK_RESPOND = 54;

    public static final int TMK_DECRYPT_REQUEST = 55; // 用于加解密数据
    public static final int TMK_DECRYPT_RESPOND = 56;

    public static final int FINGER_PIC_REQUEST = 57;
    public static final int FINGER_PIC_RESPOND = 58;



    public static  final int PIC_LOAD_REQUEST = 59;
    public static  final int PIC_LOAD_RESPOND = 60;

    public static  final int IC_LOAD_REQUEST = 61;
    public static  final int IC_LOAD_RESPOND = 62;

    public static  final int AUTO_LOAD_REQUEST = 63;
    public static  final int AUTO_LOAD_RESPOND = 64;

    public static  final int AUTO_LOG_REQUEST = 65;
    public static  final int AUTO_LOG_RESPOND = 66;


    public static final int TMK_OLD_REQUEST = 67;
    public static final int TMK_OLD_RESPOND = 68;


    public static final int RESET_KEYBOARD_REQUEST= 69;
    public static final int RESET_KEYBOARD_RESPOND= 70;


    public static final int START_LAUNCHER_REQUEST = 71;
    public static final int START_LAUNCHER_RESPOND = 72;

    public static final int LIGHT_TEST_REQUEST = 73;
    public static final int LIGHT_TEST_RESPOND = 74;

    public static final int PSAM_TEST_REQUEST = 75;
    public static final int PSAM_TEST_RESPOND = 76;

    public static final int SERIAL_TEST_REQUEST = 77;
    public static final int SERIAL_TEST_RESPOND = 78;

    public static final int SIGNATURE_INIT_REQUEST = 79;
    public static final int SIGNATURE_INIT_RESPOND = 80;

    public static final int SIGNATURE_SM2_REQUEST = 81;
    public static final int SIGNATURE_SM2_RESPOND = 82;

    public static final int SIGNATURE_SM4_REQUEST = 83;
    public static final int SIGNATURE_SM4_RESPOND = 84;


    public static final int  CALCMAC_REQUEST= 85;
    public static final int  CALCMAC_RESPOND= 86;


    public static final int  TEMPLET_REQUEST = 87;
    public static final int  TEMPLET_RESPOND = 88;
    public static final int  MATCH_REQUEST   = 89;
    public static final int  MATCH_RESPOND   = 90;

    public static final int  CHANGE_BLUE_NAME = 91; // 更改蓝牙名称

    public static final int DISCONNECT_BLUE = 93;//断开连接

    //获取设备固件版本
    public static final int  GET_DEVICE_VERSION_REQUEST= 94;
    public static final int  GET_DEVICE_VERSION_RESPOND= 95;

    //获取电池信息
    public static final int GET_BATTARY_INFO_REQUEST = 96;
    public static final int GET_BATTARY_INFO_RESPOND = 97;


    //检测各个模块信息
    public static final int CHECK_MODULE_INFO_REQUEST = 98;
    public static final int CHECK_MODULE_INFO_RESPOND = 99;

    //获取银行卡或身份证是否已取走
    public static final int CHECK_IS_CARD_OUT_REQUEST = 100;
    public static final int CHECK_IS_CARD_OUT_RESPOND = 101;

    //蜂鸣
    public static final int MAKE_BEEP_REQUEST = 102;
    public static final int MAKE_BEEP_RESPOND = 103;

    //语音控制
    public static final int MAKE_VOICE_REQUEST = 104;
    public static final int MAKE_VOICE_RESPOND = 105;

    //活体检测
    public static final int ALIVE_CHECK_REQUEST = 106;
    public static final int ALIVE_CHECK_RESPOND = 107;

    //IC卡上电 (非接和插卡)
    public static final int ICCard_POWER_ON_REQUEST = 108;
    public static final int ICCard_POWER_ON_RESPOND = 109;

    //IC卡下电 (非接和插卡)
    public static final int ICCard_POWER_OFF_REQUEST = 110;
    public static final int ICCard_POWER_OFF_RESPOND = 111;

    //IC卡apdu (非接和插卡)
    public static final int APDU_COMMAND_REQUEST = 112;
    public static final int APDU_COMMAND_RESPOND = 113;

    //检测卡 (非接 插卡 磁卡) 读取三合一接口当前的卡片放置状态
    public static final int BANKCARD_PUT_STATE_REQUEST = 114;
    public static final int BANKCARD_PUT_STATE_RESPOND = 115;

    //读社保卡
    public static final int READ_SOCIAL_CARD_REQUEST = 116;
    public static final int READ_SOCIAL_CARD_RESPOND = 117;

    //启动手写屏
    public static final int START_SCREEN_REQUEST = 200;
    public static final int START_SCREEN_RESPOND = 201;
    //关闭手写屏
    public static final int CLOSE_SCREEN_REQUEST = 202;
    public static final int CLOSE_SCREEN_RESPOND = 203;
    //接收手写屏坐标轨迹数据
    public static final int GET_SCREEN_DATA_REQUEST = 204;
    public static final int GET_SCREEN_DATA_RESPOND = 205;
    //接收手写屏图片数据
    public static final int GET_SCREEN_SIGN_IMG_REQUEST = 206;
    public static final int GET_SCREEN_SIGN_IMG_RESPOND = 207;


    public static int CONNECT_TYPE = 0;  // 0:蓝牙   1 USB

    public static final int CONNECT_TYPE_BLUE = 0;  // 0:蓝牙   1 USB

    public static final int CONNECT_TYPE_USB  = 1;  // 0:蓝牙   1 USB

    public static final String DEVICE_PREX = "A108";
    public static final String DEVICE_PREX1 = "P350";
    public static final String DEVICE_PREX2 = "UPD";


    public static final String data = "data";
    public static final String CODE = "code";
    public static final String state = "state";
    public static final String MESSAGE = "message";


    public static final int VOICE_AGAIN_ENTER = 10;
    public static final int VOICE_OUT_FINGER = 11;

    public static final int OPERATE_SUCC = 12;
    public static final int OPERATE_FAIL = 13;

    public static final int VOICE_INPUT_Validate_code = 14;
    public static final int VOICE_swipe_card_or_passbook = 15;
    public static final int VOICE_PWD_TOO_SIMPLE = 16;

}


